﻿namespace WebSocketApi.DataValidate.Interface
{
    /// <summary>
    /// 
    /// </summary>
    public interface IUserValidateService
    {

        /// <summary>
        /// 验证账号权限
        /// </summary>
        /// <returns></returns>
        Task<bool> ValidateUserAsync(string account);

        /// <summary>
        /// 验证账号权限
        /// </summary>
        /// <returns></returns>
        Task<bool> ValidateUserAsync(string account, string password);

        /// <summary>
        /// 验证消息体中的发送者是否有效
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        Task<bool> ValidateBodyMessageSrcAccount(string message);

        /// <summary>
        /// 验证消息体中的接收者是否有效
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        Task<bool> ValidateBodyMessageDstAccount(string message);

        /// <summary>
        /// 验证用户Token
        /// </summary>
        /// <param name="token"></param>
        /// <returns></returns>
        Task<bool> ValidateConnTokenAsync(string token);

    }
}
